package com.jiyun.personal.service.impl;

import com.jiyun.personal.domain.Personal;
import com.jiyun.personal.mapper.PersonalMapper;
import com.jiyun.personal.service.PersonalService;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PersonalServiceImpl implements PersonalService {
    @Autowired
    private PersonalMapper PersonalMapper;
    //      查询所有
    @Override
    public List<Personal> getPersonal() {
        return PersonalMapper.getPersonal();
    }
    //      常用地址
    @Override
    public String getAddress(String fareAddress) {
        return PersonalMapper.getAddress(fareAddress);
    }
    //      修改密码
    @Override
    public  Integer updatePassword(String passengerId,String farePassword) {
        System.out.println(passengerId+" "+farePassword);
        return PersonalMapper.updatePassword(passengerId,farePassword);
    }
    //      修改手机号码
    @Override
    public  Integer updatePhone(String passengerId,String farePhone) {
        return PersonalMapper.updatePhone(passengerId,farePhone);
    }
    //      修改状态
    @Override
    public Integer updateStatus2(Integer id) {
        return PersonalMapper.updateStatus2(id);
    }

    @Override
    public Integer updateStatus3(Integer id) {
        return PersonalMapper.updateStatus3(id);
    }
    @Override
    public Integer updateStatus4(Integer id) {
        return PersonalMapper.updateStatus4(id);
    }

    @Override
    public Integer updateStatus5(Integer id) {
        return PersonalMapper.updateStatus5(id);
    }
    @Override
    public Integer updateStatus6(Integer id) {
        return PersonalMapper.updateStatus6(id);
    }

    @Override
    public Integer updateStatus7(Integer id) {
        return PersonalMapper.updateStatus7(id);
    }
    //      查询初始密码
    @Override
    public String isOldPasswordCorrect(String passengerId, String fareStartPassword) {
        return PersonalMapper.isOldPasswordCorrect(passengerId,fareStartPassword);
    }
    //      查询手机号码
    @Override
    public Personal chaxun(String farePhone) {
        return PersonalMapper.chaxun(farePhone);
    }


}
